Third maximum number problem solve